package hao.bk.parking;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import hao.bk.royalmap.RoyalMapActivity;

public class ParkingLayout extends RelativeLayout{
	/**
	 * Hiện thị chức năng lưu vị trí đỗ xe
	 * @author haoDV
	 * 
	 */
	private RoyalMapActivity main;
	public ParkingGeneralLayout generalLayout;
	
	public ParkingLayout(Context context, AttributeSet attrs) {
		
		super(context, attrs);
		main = (RoyalMapActivity)context;
	}
	/**
	 * Hiện thị trang Parking mặc định
	 */
	public void showParking(){
		generalLayout = new ParkingGeneralLayout(main);
		addContent(generalLayout);
		generalLayout.initParams();
	}
	// Thêm trang trong Parking
	public void addContent(View view) {
		this.removeAllViews();
		RelativeLayout.LayoutParams param = new LayoutParams(
				LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		this.addView(view, param);
	}
	
}
